Use PESetMargins to set the page margins for the specified report to the values you supply as parameters. Use this function any time you want to set the printer margins at runtime in response to user specifications.
BOOL CRPE_API PESetMargins (
short printJob,
short left,
short right,
short top,
short bottom );
For each margin parameter, specify the margin in twips or PM_SM_DEFAULT to use the corresponding default margin for the currently selected printer. See Remarks below.
Specifies the print job for which you want to set new margins. | |
VB Sample Code for modifying title, options, margins, and date |
Declare Function PESetMargins Lib "crpe32.dll" ( ByVal printJob As Integer,
ByVal LeftMargin As Integer, ByVal RightMargin As Integer,
ByVal TopMargin As Integer, ByVal BottomMargin As Integer ) As Integer
function PESetMargins (
printJob: Word;
left: Word;
right: Word;
top: Word;
bottom: Word
): Bool stdcall;
EXTERN CLOGICAL PESetMargins (CWORD, CWORD, CWORD, CWORD, CWORD) CRPE.DLL
Seagate Software IMG Holdings, Inc. http://www.seagatesoftware.com Support services: http://support.seagatesoftware.com |